package com.yvon.maple.service.msg.sub.model.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import com.yvon.boot.mybatis.model.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Map;

/**
 * 主动订阅
 *
 * @author : Yvon
 * @since : 2022-05-19
 */
@EqualsAndHashCode(callSuper = true)
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName(value = "msg_subscribe_active",autoResultMap = true)
public class SubscribeActive extends BaseEntity implements Serializable {

    /**
     * 订阅ID
     */
    private Long subscribeId;

    /**
     * 用户名
     */
    private Long userId;

    /**
     * 发送渠道及模板
     * 示例：{"im": 2, "sms": 3}
     * key:渠道类型,value:模板ID
     */
    @TableField(typeHandler = FastjsonTypeHandler.class)
    private Map<String, String> channelTemplate;
}
